package com.colabo.j2ee.web.core.dao.extension.ibatis;


/**
 * Informix数据库方言
 */
public class InformixDialect implements IDialect {
	public String getPagedString(String sql, boolean hasOffset) {
		return null;
	}

	public String getPagedString(String sql, int offset, int limit) {
		if (offset > 0) {
			throw new UnsupportedOperationException("informix has no offset");
		}
		return new StringBuffer(sql.length() + 8).append(sql).insert(sql.toLowerCase().indexOf("select") + 6, " first " + limit).toString();
	}

	public boolean supportsPaged() {
		return false;
	}
}
